In some software applications, instances of a particular data type may be processed, formatted, and/or displayed according to one or more style sheets. A style sheet may by written in a number of different formats and programming languages, and may include templates that include instructions for operations performed on one or more of the instances of the data types according to matching criteria. A template processor may analyze an input file including data type definitions and instances. The template processor may also analyze an input file that includes template definitions, which may include matching criteria and processing instructions. Data types and/or instances may be matched by the template processor to template definitions according to the matching criteria, and output may be produced according to instructions within the template definitions.
For example, XML files may contain elements and sub-elements that may be considered data types and/or data instances. An XSLT file is a type of style sheet that contains templates used by an XSLT processor to process the XML data types and instances. The XSLT templates may be denoted by the <xsl:template> instruction, which includes a “match” attribute. The “match” attribute may be used by the XSLT processor to match a characteristic of one or more of the XML data types/instances to the template by comparing the match field to the attributes and/or sub-elements of the data type/instance.